package com.ideaaedi.zoo.diy.artifact.sse.core;

import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;

/**
 * 回调
 *
 * @author <font size = "20" color = "#3CAA3C"><a href="https://gitee.com/JustryDeng">JustryDeng</a></font> <img src="https://gitee.com/JustryDeng/shared-files/raw/master/JustryDeng/avatar.jpg" />
 * @since 1.0.0
 */
public interface SsePusherCallback {

    /**
     * 在SseEmitter添加到clientEmitterMap后回调此方法
     *
     * @param emitterUuid 客户端唯一id
     * @param sseEmitter sse实例
     */
    void onPut(String emitterUuid, SseEmitter sseEmitter);


    /**
     * 有并且移除成功本地的SseEmitter后回调此方法
     *
     * @param emitterUuid 客户端唯一id
     */
    void onRemove(String emitterUuid);
}
